package com.longjianghuasheng.logistics.ext

import androidx.fragment.app.Fragment
import androidx.lifecycle.LiveData

fun <T> LiveData<T>.observer(fragment: Fragment, block: (T) -> Unit) {
    observe(fragment.viewLifecycleOwner) {
        block(it)
    }
}